import request from '@/utils/request'
import Qs from 'qs'

// 查询字典创建人
export function queryTenantOfCreateDict() {
  return request({
    url: '/sys/dict/queryTenantOfCreateDict',
    method: 'get'
  })
}

// 查询字典列表
export function listDict(data) {
  return request({
    url: '/sys/dict/listDict',
    method: 'get',
    params: data
  })
}

// 通过id删除字典
export function removeDictByIds(data) {
  return request({
    url: '/sys/dict/removeDictByIds',
    method: 'delete',
    params: {
      dictIds: data
    },
    paramsSerializer: params => {
      return Qs.stringify(params, { indices: false })
    }
  })
}

export const download = (data) => {
  console.log('aaaaaaa')
  return request({
    url: '/sys/dict/download',
    method: 'get',
    responseType: 'blob',
    data: data
  })
}


